# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Leo <thinkabit.ukim@gmail.com>
pkgname=kvantum
pkgver=0.16.1
pkgrel=0
pkgdesc="SVG-based theme engine for Qt5"
options="!check" # No testsuite
url="https://github.com/tsujan/Kvantum"
arch="all !armhf" # Limited by kwindowsystem-dev
license="GPL-2.0-or-later"
depends="hicolor-icon-theme"
makedepends="cmake qt5-qtbase-dev qt5-qtsvg-dev qt5-qtx11extras-dev libx11-dev
	libxext-dev kwindowsystem-dev qt5-qttools-dev samurai"
source="$pkgname-$pkgver.tar.gz::https://github.com/tsujan/Kvantum/archive/V$pkgver/kvantum-$pkgver.tar.gz"
builddir="$srcdir/Kvantum-$pkgver/Kvantum"

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake \
		-GNinja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
		-DCMAKE_C_FLAGS="$CFLAGS" \
		-DENABLE_QT4=OFF \
		$CMAKE_CROSSOPTS .
	ninja
}

package() {
	DESTDIR="$pkgdir" ninja install
	rm -rf "$pkgdir"/usr/share/kde4
}

sha512sums="ee5dec07f7aa3aef70820606eb5f0d693fac8b8e714fba49ce7062ad7dc31ec0d9c9ba73730d4cad087927adc5d0e2609a4ae4eb21879d8e924865dd32d0740f  kvantum-0.16.1.tar.gz"
